﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NightskyMimic.Domain
{
    public class Block : Action
    {
        public Creature Attacker { get; set; }

        public Block(Creature target, Creature attacker)
            : base(target)
        {
            Attacker = attacker;
        }

        public override string ToString()
        {
            return Target.ToString() + " b " + Attacker.ToString();
        }

        public override bool Equals(object obj)
        {
            Block other = obj as Block;
            return this.Attacker.Id == other.Attacker.Id && this.Target.Id == other.Target.Id;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
